home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / sftgrd / 2_groups.bas < prev    next >
BASIC Source File  |  1996-06-12  |  2KB  |  95 lines

  1. ': 2_GROUPS.BAS
  2. '-
  3. '- Manages two groups, left and right
  4. '-
  5. Option Explicit
  6.  
  7. Sub tgp_addLeftSide (ByVal s As String)
  8.  
  9.    fmtTwoGroups!lstLeft.AddItem s
  10.  
  11. End Sub
  12.  
  13. Sub tgp_addRightSide (ByVal s As String)
  14.  
  15.    fmtTwoGroups!lstRight.AddItem s
  16.  
  17. End Sub
  18.  
  19. Sub tgp_end ()
  20.  
  21.    Unload fmtTwoGroups
  22.  
  23. End Sub
  24.  
  25. Sub tgp_initialize (ByVal windowTitle_s As String, ByVal leftTitle_s As String, ByVal rightTitle_s As String)
  26.    
  27.    Load fmtTwoGroups
  28.  
  29.    fmtTwoGroups.Caption = windowTitle_s
  30.  
  31.    'Setup Left lable and listbox
  32.    If leftTitle_s <> "" Then
  33.       fmtTwoGroups.lblLeft.Caption = leftTitle_s
  34.    Else
  35.       fmtTwoGroups.lblLeft.Visible = False
  36.    End If
  37.    fmtTwoGroups!lstLeft.Clear
  38.  
  39.    'Setup Right lable and listbox
  40.    If rightTitle_s <> "" Then
  41.       fmtTwoGroups.lblRight.Caption = rightTitle_s
  42.    Else
  43.       fmtTwoGroups.lblRight.Visible = False
  44.    End If
  45.    fmtTwoGroups!lstRight.Clear
  46.  
  47. End Sub
  48.  
  49. Function tgp_LeftList_s (ByVal listIndex As Integer) As String
  50.  
  51.    tgp_LeftList_s = fmtTwoGroups!lstLeft.List(listIndex)
  52.  
  53. End Function
  54.  
  55. Function tgp_RightList_s (ByVal listIndex As Integer) As String
  56.    
  57.    tgp_RightList_s = fmtTwoGroups!lstRight.List(listIndex)
  58.  
  59. End Function
  60.  
  61. Sub tgp_SetLeftListSorted (ByVal sorted_b As Integer)
  62.    
  63.    'fmtTwoGroups!lstRight.Sorted = sorted_b
  64.  
  65. End Sub
  66.  
  67. Sub tgp_SetRightListSorted (ByVal sorted_b As Integer)
  68.  
  69.    'fmtTwoGroups!lstRight.Sorted = sorted_b
  70.  
  71. End Sub
  72.  
  73. Function tgp_ShowForm_s () As String
  74.  
  75. ' Returns "OK" if OK button clicked
  76. ' Returns "CANCEL" if Cancel button clicked
  77.    'Modal show of the form
  78.    fmtTwoGroups.Show 1
  79.  
  80.    tgp_ShowForm_s = fmtTwoGroups!lblExitStatus.Caption
  81.  
  82.  
  83. End Function
  84.  
  85. Function tpg_LeftListCount_i () As Integer
  86.       tpg_LeftListCount_i = fmtTwoGroups!lstLeft.ListCount
  87. End Function
  88.  
  89. Function tpg_RightListCount_i () As Integer
  90.  
  91.    tpg_RightListCount_i = fmtTwoGroups!lstRight.ListCount
  92.  
  93. End Function
  94.  
  95.